package com.dorm.cj.extension.scope;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
//prototype
@Scope("threadLocalScope")
@Service
public class TestScopeService {

    @PostConstruct
    public void init() {
        System.out.println(Thread.currentThread().getName() + "-------TestScopeService init-------------");
    }

    public void test() {
        System.out.println(Thread.currentThread().getName() + "-------TestScopeService test-------------");
    }
}
